import type { Permission, Role } from './rbac'

// 用户基本信息接口
export interface UserInfo {
  id: number
  username: string
  email: string
  phone?: string
  avatar?: string
  nickname?: string
  status: number
  createdTime: string
  updatedTime: string
  lastLoginTime?: string
  roles: Role[]
  permissions: Permission[]
}

// 用户列表查询参数
export interface UserQueryParams {
  page: number
  pageSize: number
  username?: string
  email?: string
  phone?: string
  status?: number
  roleId?: number
  startTime?: string
  endTime?: string
}

// 用户表单数据
export interface UserForm {
  id?: number
  username: string
  password?: string
  email: string
  phone?: string
  avatar?: string
  nickname?: string
  status: number
  roleIds: number[]
}

// 用户列表项接口
export interface User {
  id: number
  username: string
  email: string
  role: string
  department: string
  status: 'active' | 'inactive'
  lastLogin: string
  avatar: string
}
